<?php

namespace app\modules\v1\models;

use Yii;

/**
 * This is the model class for table "{{%_log}}".
 *
 * @property integer $id
 * @property string $operation
 * @property string $class
 * @property string $requestData
 * @property string $ip
 * @property string $dateTime
 */
class Log extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%_log}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['operation', 'class', 'requestData', 'ip'], 'required'],
            [['requestData'], 'string'],
            [['operation', 'ip'], 'string', 'max' => 16],
            [['dateTime'], 'string', 'max' => 32],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'operation' => 'Operation',
            'class' => 'Class',
            'requestData' => 'Request Data',
            'ip' => 'Ip',
            'dateTime' => 'Date Time',
        ];
    }
}
